/*
 * GateWayDispatcher.h
 *
 *  Created on: Sep 13, 2016
 *      Author: root
 */

#ifndef GATEWAY_GATEWAYDISPATCHER_H_
#define GATEWAY_GATEWAYDISPATCHER_H_
#include "../base/net/yDispatcher.h"
#include "../base/net/yByteArray.h"
#define OPCODE_MAX 65536
class GateWayDispatcher: public BaseDispatcher {
private:
	int (*fCallback[OPCODE_MAX])(connection_t ctx, ByteArray&buffer);
protected:
public:
	GateWayDispatcher();
	~GateWayDispatcher();
	void init();
	int handle(connection_t ctx, char* buf, int len);

};

#endif /* GATEWAY_GATEWAYDISPATCHER_H_ */
